<?php

namespace app\common\api\controller;

use app\common\model\Member;
use app\common\model\UcenterMember;
use think\Controller;

final class Error extends Controller
{
    public static function regError($code = 0)
    {
        switch ($code) {
            case -1:
                $error = '用户名长度必须在16个字符以内！';
                break;
            case -2:
                $error = '用户名被禁止注册！';
                break;
            case -3:
                $error = '用户名被占用！';
                break;
            case -4:
                $error = '密码长度必须在6-30个字符之间！';
                break;
            case -5:
                $error = '邮箱格式不正确！';
                break;
            case -6:
                $error = '邮箱长度必须在1-32个字符之间！';
                break;
            case -7:
                $error = '邮箱被禁止注册！';
                break;
            case -8:
                $error = '邮箱被占用！';
                break;
            case -9:
                $error = '手机格式不正确！';
                break;
            case -10:
                $error = '手机被禁止注册！';
                break;
            case -11:
                $error = '手机号被占用！';
                break;
            case -12:
                $error = '用户名必须以中文或字母开始，只能包含拼音数字，字母，汉字！';
                break;


            case -21:
                $error = '请输入正确的身份证号！';
                break;
            case -22:
                $error = '请输入正确的身份证号！';
                break;
            case -23:
                $error = '该身份证号已经注册过！';
                break;


            case -30:
                $error = '用户名不存在或已被删除！';
                break;
            case -31:
                $error = '用户名已经被激活！';
                break;
            case -32:
                $error = '查询奖金规则失败！';
                break;
            case -33:
                $error = '当前用户电子币不足，请充电子币或把奖金转为电子币后在充值！';
                break;
            case -34:
                $error = '生成推荐奖失败！';
                break;
            case -35:
                $error = '生成奖金变更表失败！';
                break;

            case -40:
                $error = '查询奖金规则失败';
                break;
            case -41:
                $error = '激活会员不存在';
                break;
            case -50:
                $error = '用户不存在';
                break;
            case -51:
                $error = '用户已激活';
                break;
            case -52:
                $error = '用户已退出平台';
                break;
            case -100:
                $error = '报单币不足';
                break;
            case -101:
                $error = '购物券不足';
                break;
            case -102:
                $error = '扣费失败';
                break;
            case -103:
                $error = '激活失败';
                break;

            case -500:
                $error = '数据表写入失败！';
                break;

            case -1000:
                $error = '推荐人不存在或被冻结';
                break;
            case -1500:
                $error = '接点人不存在或被冻结';
                break;
            case -1501:
                $error = '该接点位不为空';
                break;
            case -1502:
                $error = '接点位已满';
                break;
            case -1503:
                $error = '该系统暂时没有接点位';
                break;

            case -3000:
                $error = '所选报单中心不存在';
                break;

            default:
                $error = $code;
        }
        return $error;
    }
}